Repository navigation
Build: Move type checking and test suites to tox - #4494
Open
oresttokovenko wants to merge 2 commits into
Open
oresttokovenko wants to merge 2 commits into
oresttokovenko wants to merge 2 commits into
Conversation
Contributor
|
Thanks @oresttokovenko for raising this PR, and joining the PyIceberg sync the other day. Sorry for the reviewing taking some time, but I wanted to take the time to dive into it, and let it sink in a bit. I hate to be that guy that dismisses changes, but I want to make sure that we're heading into the right direction. Couple of things:
Again, I would also like to invite others to get their opinion. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
This PR moves mypy type checking and the test suites out of
Makefileand.pre-commit-config.yamlinto a dedicatedtox.toml, backed bytox-uv-bare(uv-venv-lock-runner) and PEP 735[dependency-groups]inpyproject.toml.Makefilestays for setup, linting, docs, interactive notebooks, andclean;prekstays for formatting and fast linters.tox.tomlwith defaultenv_list(typecheckandtest-3.11–test-3.14) plusunit,integration,s3,adls,gcs,notebook, andcoverage[dependency-groups](lint,tox,types,coverage) inpyproject.tomland updatesuv.lock, so every tox environment installs strictly fromuv.lockmirrors-mypyfrom.pre-commit-config.yamlMakefile(retaininginstall*,lint,check-license,docs-*,notebook*,clean).github/workflows/python-ci.yml,.github/workflows/python-integration.yml,dev/release/verify_rc.sh,MANIFEST.in,dev/.rat-excludes,AGENTS.md,mkdocs/docs/contributing.md, andmkdocs/docs/verify-release.mdWhy
Following the Nov 24 community sync, this scopes the tooling cleanup down from #4208 to just testing and type checking using
tox(rather than replacingMakefileandprekwholesale withnoxandjust).Previously, test and type-checking logic was split across
Makefile,.pre-commit-config.yaml, and the CI workflows:mirrors-mypypinnedmypyand itstypes-*stubs outsidepyproject.toml/uv.lock, so Dependabot'suvecosystem did not bump them and localuv runcould not reproduce the isolated CI mypy environment--no-extra hive-kerberoson Windows) anduv sync/pytest/coverageinvocations across workflows andMakefiletox.toml+uv-venv-lock-runner, CI and local runs invoke the same environments with the same locked dependencies fromuv.lock, andtypecheckruns as its own fast job instead of hiding behindmatrix.python == '3.11'Where the old recipes and checks live now
mirrors-mypy(prek)uv run tox -e typecheckmake testuv run tox -e unit(oruv run tox -pfor 3.11–3.14)make test PYTEST_ARGS="..."uv run tox -e unit -- ...make test-integrationuv run tox -e integration(KEEP_COMPOSE=1to keep containers up)make test-s3/test-adls/test-gcsuv run tox -e s3/adls/gcsmake test-notebookuv run tox -e notebookmake coverage-reportuv run tox -e coveragemake test-coverageCOVERAGE=1 uv run tox -e unit,integration,s3,adls,gcs,coveragemake install,make lint,make check-license,make docs-serve,make docs-build,make notebook,make notebook-infra, andmake cleanremain inMakefileTests
uv lock --checkpassedCOVERAGE=1 COVERAGE_FAIL_UNDER=0 uv run --locked --only-group tox tox run -r -e typecheck,test-3.13,coverage -- tests/avro/test_decoder.pypassed (typecheck: 0 issues across 222 files;test-3.13: 68 passed;coverage: combined and reported)uv run --locked --only-group tox tox run --notest -e unitsynced cleanly fromuv.lockuv run --locked --only-group lint prek run -apassed all 10 remaining hookszizmorreported 0 findings on.github/workflows/python-ci.ymland.github/workflows/python-integration.yml